package com.nisco.dms.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.validator.constraints.NotBlank;

@Entity
@Table(name = "Dc_Sys_Dictionary_Dtl")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = "com.nisco.dms.entity")
public class DictionaryDtl extends CoreEntity {

	@NotBlank
	@Column(length = 20)
	private String strSn;

	@NotBlank
	@Column(length = 100, nullable = false)
	private String strValue;

	@Column(length = 200)
	private String strDesc;
	
	@ManyToOne
	@JoinColumn(name="dictId")
	private Dictionary dict;
	
	@Column
	private String strField;
	@Column
	private String strSimpleSpell;
	@Column
	private String strAllSpell;

	public String getStrSn() {
		return strSn;
	}

	public void setStrSn(String strSn) {
		this.strSn = strSn;
	}



	public String getStrValue()
	{
		return strValue;
	}

	public void setStrValue(String strValue)
	{
		this.strValue = strValue;
	}

	public String getStrDesc() {
		return strDesc;
	}

	public void setStrDesc(String strDesc) {
		this.strDesc = strDesc;
	}
	

	

	public Dictionary getDict()
	{
		return dict;
	}

	public void setDict(Dictionary dict)
	{
		this.dict = dict;
	}

	public String getStrField()
	{
		return strField;
	}

	public void setStrField(String strField)
	{
		this.strField = strField;
	}

	public String getStrSimpleSpell()
	{
		return strSimpleSpell;
	}

	public void setStrSimpleSpell(String strSimpleSpell)
	{
		this.strSimpleSpell = strSimpleSpell;
	}

	public String getStrAllSpell()
	{
		return strAllSpell;
	}

	public void setStrAllSpell(String strAllSpell)
	{
		this.strAllSpell = strAllSpell;
	}

	/**
	 * reflectionToString将对象输出为string类型。
	 */
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

}
